import VueRouter from "vue-router";
import MyAbout from '../pages/About.vue'
import MyHome from '../pages/Hemo.vue'
import MyMessage from '../pages/Message.vue'
import MyNews from '../pages/News.vue'
import MyDetail from '../pages/Detail.vue'
import MyNewsDetail from "../pages/NewsDetail.vue"
export default new VueRouter({
    routes: [
        {

            name: 'about',
            path: '/about',
            component: MyAbout
        },
        {
            name:"demo",
            path: '/home',
            component: MyHome,
            children:[
                {
                    path: 'message',
                    component: MyMessage,
                    children:[
                        {
                            path: 'detail/:id/:content',
                            component: MyDetail
                        }
                    ]
                },
                {
                    path: 'news',
                    component: MyNews,
                    children:[
                        {
                            name:'test',
                            path: 'newsDetail/:id/title',
                            component: MyNewsDetail
                        }
                    ]
                }
            ]
        }

    ]
})
